<script setup>
    import {useMoneyStore} from '../stores/money.js'
    import {useStore} from '../stores/user.js'

    const useMoney = useMoneyStore();
    const use = useStore();

    const add = ()=>{
        useMoney.pay(3);
    }

    const div = ()=>{
        useMoney.win(4)
    }

    const update = ()=>{
        use.updateUsername('lisi');
    }


</script>

<template>
    <h1>修改数据的组件</h1>
    <button @click="div">修改数据1  添加 </button>
    <button @click="add">修改数据2  减少 </button>
    <button @click="update">修改姓名 </button>



</template>

<style scoped>

</style>